App.controller('todoController', ['$scope', '$state', '$stateParams', 'Page', function($scope, $state, $stateParams, Page) {

    $scope.grid = {
        column_defs: [
            {
            	target: 1,
				template: function (row) {
				     return '<a href="javascript:void(0);;" ed-click="browser">' + row.processInstanceId + '</a>'
				}
            },{
                target: 6,
                buttons: [
                    {
                        name: '办理',
                        class: 'btn-success',
                        icon: 'fa-edit',
                        event: function(row) {
                            $state.go('auth.taskComplete', {task: row, taskId: row.id});
                        }
                    }
                ]
            }
        ],
        browser: function (row) {
 			$state.go('auth.processView', {processInstanceId: row.processInstanceId});
        }
    }
}]);
